<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 * Created on 2012-7-4
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
if(!defined('THEME_URL')){
	$theme = common::_get_setting('current_theme') ? common::_get_setting('current_theme') : OB_DEFAULT_THEME;
	define('THEME_URL',base_url().OB_THEMES_DIR.'/'.$theme.'/');
}
//根据返回信心提示消息框。
$this->load->view('common/message');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php  echo common::_get_setting('blog_title')?></title>
<link style="text/css" href="<?php echo THEME_URL;?>css/base.css" rel="stylesheet"/>
<link style="text/css" href="<?php echo THEME_URL;?>css/style.css" rel="stylesheet"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="<?php echo THEME_URL;?>js/common.js"></script>
</head>
<body>
	<div id='main'>
		<div id='head'>
			<h1><?php echo anchor(site_url(),common::_get_setting('blog_title'))?></h1>
			<h2><?php echo common::_get_setting('blog_slogan')?></h2>
		<div id="login">
			<?php if($username = $this->session->userdata('username')):?>
				欢迎你：<?php echo $username;?> <a href='<?php echo site_url();?>/admin/login/logout' >退出</a>
			<?php else:?>
				<form action="<?php echo site_url()?>/background/checklogin" method="post" >
	  			<input type='hidden' name='current_url' value='<?php echo current_url()?>'/>
		  		<input type="text" name="username" size="20" maxlength="20"/><br />
		  		<input type="password" name="password"  size="20" maxlength="20"/><br />
		  		<input type="submit" name="login" value="登录"/>
	  			<input type="button" name="submit" value="注册"/>
				</form>
			<?php endif;?>
		</div>
		<div id="tolbar">
			  <ul>
			    <li><?php echo anchor(site_url(),'首页')?></li>
			    <?php $this->plugin->trigger('PLUGIN::NAVIGATION','<li><a href="{link}">{title}</a></li>','0')?>
			    <?php if($this->session->userdata('username')!=''):?>
			    <li><?php echo anchor(site_url().'/admin','后台管理');?></li>
			    <?php endif;?>
			    </ul>
			</div>
		</div>

